﻿CREATE PROCEDURE [acms].[UserSecurity_GetById]
	@Id int, 
	@UpdateActivity bit
AS
	IF @UpdateActivity = 1 BEGIN
		Update Users
		Set LastActivity = getDate()
	END

	SELECT *
	FROM [acms].[UserSecurity_View]
	WHERE Id = @Id
	
	RETURN 0;